#include "frgui_port.h"



int gui_create_lock( GUI_LOCK_T *xSemaphore)
{
    *xSemaphore =xSemaphoreCreateMutex();

    return *xSemaphore? 1:0;
}

int gui_get_lock(GUI_LOCK_T xSemaphore)
{
    return xSemaphoreTake(xSemaphore, portMAX_DELAY);

}

void gui_release_lock (GUI_LOCK_T xSemaphore)
{
    xSemaphoreGive(xSemaphore);
}

int gui_del_lock (GUI_LOCK_T xSemaphore)
{
    vSemaphoreDelete(xSemaphore);

    return 1;
}
